import 'package:flutter/material.dart';
import 'package:flutterapp2/extension/extension.dart';

import 'special_house_item_widegt.dart';

class SpecialHouseWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Material(
      color: Colors.white,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Row(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Text(
                '特价房(?)',
                style: TextStyle(
                  fontSize: 16,
                  fontWeight: FontWeight.bold,
                  color: Color(0xFF222222),
                ),
              ).expanded(),
              Row(
                children: <Widget>[
                  Padding(
                      padding: EdgeInsets.only(
                        left: 8,
                      ),
                      child: Text(
                        '更多',
                        style: TextStyle(
                          fontSize: 12,
                          color: Color(0xFF999999),
                        ),
                      )),
//                  Image.asset(
//                    AssetsUtil.getAssetsImgPath('ic_go_green'),
//                    height: 13.0,
//                    width: 13.0,
//                  )
                ],
              ),
            ],
          ).size(
            height: 56,
          ),
          ListView.separated(
              shrinkWrap: true, // 解决listview嵌套不显示
              physics: NeverScrollableScrollPhysics(), // 解决嵌套内存拦截外层的滑动
              itemBuilder: (context, index) {
                // todo 数据塞进去
                return SpecialHouseItemWidget();
              },
              separatorBuilder: (context, index) => Divider(
                    height: 0.7,
                    thickness: 0.7,
                    color: Color(0xFFE5E5E5),
                  ).padding(EdgeInsets.symmetric(horizontal: 20)),
              itemCount: 4)
        ],
      ).padding(const EdgeInsets.symmetric(horizontal: 20)),
    );
  }
}
